﻿using System;

namespace MantisCommon.Settings
{
    public class MySettingsManager : Common.SettingsManager
    {
        public MySettingsManager()
            : base()
        {
            Add("URL");
            Add("HTTPUSERNAME");
            Add("HTTPPASSWORD", "", true, "MantisBT");
            Add("USERNAME");
            Add("PASSWORD", "", true, "MantisBT");
            Add("PROJECT");
        }

        public MySettingsManager(String parameters)
            : this()
        {
            Set(parameters);
        }

        public String Url
        {
            get { return this["URL"]; }
            set { this["URL"] = value; }
        }

        public String HTTPUsername
        {
            get { return this["HTTPUSERNAME"]; }
            set { this["HTTPUSERNAME"] = value; }
        }

        public String HTTPPassword
        {
            get { return this["HTTPPASSWORD"]; }
            set { this["HTTPPASSWORD"] = value; }
        }

        public String Username
        {
            get { return this["USERNAME"]; }
            set { this["USERNAME"] = value; }
        }

        public String Password
        {
            get { return this["PASSWORD"]; }
            set { this["PASSWORD"] = value; }
        }

        public String ProjectName
        {
            get { return this["PROJECT"]; }
            set { this["PROJECT"] = value; }
        }
    }
}